package com.cskaoyan.mall.bean.vo;

import com.cskaoyan.mall.bean.Category;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author: dyj
 * @Date: 2021/1/10 20:36
 * @Description
 */
@Data
@NoArgsConstructor
public class CategoryVO {
    private Integer id;

    /**
     * 类目名称
     */
    private String name;

    /**
     * 类目关键字，以JSON数组格式
     */
    private String keywords;

    /**
     * 类目广告语介绍
     */
    private String desc;

    /**
     * 父类目ID
     */
    private Integer pid;

    /**
     * 类目图标
     */
    private String iconUrl;

    /**
     * 类目图片
     */
    private String picUrl;

    private String level;

    /**
     * 创建时间
     */
    private String addTime;

    /**
     * 更新时间
     */
    private String updateTime;

    public CategoryVO(Category category){
        this.id = category.getId();
        this.name = category.getName();
        this.keywords = category.getKeywords();
        this.desc = category.getDesc();
        this.pid = category.getPid();
        this.iconUrl = category.getIconUrl();
        this.picUrl = category.getPicUrl();
        this.level = category.getLevel();
        this.addTime = category.getAddTime();
        this.updateTime = category.getUpdateTime();
    }
}
